/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.cezary.butler.walili.common;

/**
 *
 * @author Cezary Butler
 */
public class IllegalStatusChange extends Exception{
    TaskStatus stary,nowy;
    
    public IllegalStatusChange(TaskStatus s,TaskStatus n){        
        stary=s;
        nowy=n;
    }
    
    public IllegalStatusChange(TaskStatus s,TaskStatus n,Throwable e){
        super(e);
        stary=s;
        nowy=n;
    }

    @Override
    public String getMessage() {
        return String.format("Niedozwolone przejscie miedzy stanami, stary stan %s, nowy stan %s",stary,nowy);
    }
    
    
    
}
